home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Documentation / Autodocs / animation_dtc.doc < prev    next >
Encoding:
Text File  |  1999-10-22  |  9.0 KB  |  255 lines

  1. TABLE OF CONTENTS
  2.  
  3. animation.datatype/animation.datatype
  4. animation.datatype/animation.datatype   animation.datatype/animation.datatype
  5.  
  6.     NAME
  7.         animation.datatype -- root data type for animations.
  8.  
  9.     FUNCTION
  10.         The animation.datatype is the super-class for any animation related
  11.         classes.
  12.  
  13.         This class is responsible for creating the controls, scaling,
  14.         remapping and synchronization.
  15.  
  16.     METHODS
  17.         OM_NEW -- Create a new animation object.
  18.  
  19.         OM_GET -- Obtain the value of an attribute.
  20.  
  21.         OM_SET -- Set the values of multiple attributes.
  22.  
  23.         OM_UPDATE -- Update the values of multiple attributes.
  24.  
  25.         OM_DISPOSE -- Dispose of a animation object.
  26.  
  27.         GM_LAYOUT -- Layout the object and notify the application of the
  28.             title and size.
  29.  
  30.         GM_HITTEST -- Determine if the object has been hit with the
  31.             mouse.
  32.  
  33.         GM_GOACTIVE -- Tell the object to go active.  On SELECTDOWN, the
  34.             animation will start playing.
  35.  
  36.         GM_HANDLEINPUT -- Handle input.  Currently input (other than
  37.             SELECTDOWN) doesn't affect the animation.
  38.  
  39.         GM_RENDER -- Cause the current frame to render.
  40.  
  41.         DTM_FRAMEBOX -- Obtain the display environment that the animation
  42.             requires.
  43.  
  44.         DTM_TRIGGER -- Cause an event to occur.  Currently the only
  45.             trigger event is STM_PLAY, which will cause the animation to
  46.             start playing.
  47.  
  48.         DTM_COPY -- Copy the current frame to the clipboard as an IFF ILBM.
  49.  
  50.         DTM_WRITE -- Write the current frame to a file as an IFF ILBM.
  51.  
  52.         DTM_PRINT -- Print the current frame.
  53.  
  54.         ADTM_LOADFRAME -- Load a frame of the animation.
  55.  
  56.         ADTM_UNLOADFRAME -- Deallocate any memory allocated by
  57.             ADTM_LOADFRAME.
  58.  
  59.         ADTM_START -- Start the animation.  This MUST be passed to the
  60.             super-class AFTER the sub-class has started.
  61.  
  62.         ADTM_PAUSE -- Pause the animation.  This MUST be passed to the
  63.             super-class BEFORE the sub-class pauses.
  64.  
  65.         ADTM_STOP -- Stop the animation.  This MUST be passed to the
  66.             super-class BEFORE the sub-class stops.
  67.  
  68.         ADTM_LOCATE -- Used to locate a frame of the animation.
  69.  
  70.         ADTM_LOADNEWFORMATFRAME -- Load a new format frame of the animation,
  71.             for more information, see <datatypes/animationclass.h>. (V44)
  72.  
  73.         ADTM_UNLOADNEWFORMATFRAME -- Deallocate any memory allocated by
  74.             ADTM_LOADNEWFORMATFRAME. (V44)
  75.  
  76.     TAGS
  77.         DTA_ControlPanel (BOOL) -- Determine whether the control
  78.             panel is shown.  Defaults to TRUE.
  79.  
  80.             Applicability is (I).
  81.  
  82.         DTA_Immediate (BOOL) -- Indicate whether the animation
  83.             should immediately begin playing.  Defaults to
  84.             FALSE.
  85.  
  86.             Applicability is (I).
  87.  
  88.         DTA_Repeat (BOOL) -- Indicate whether the animation
  89.             should loop. (V44)
  90.  
  91.             Default for this tag is FALSE. Applicability is (IS).
  92.  
  93.         ADTA_Remap (BOOL) -- Indicate whether the animation should be
  94.             remapped or not.
  95.  
  96.             Applicability is (I).
  97.  
  98.         ADTA_ModeID (ULONG) -- Set and get the graphic mode id of the
  99.             picture.
  100.  
  101.             Applicability is (ISG).
  102.  
  103.         ADTA_Width (ULONG) -- Width of a frame in pixels.
  104.  
  105.             Applicability is (IG).
  106.  
  107.         ADTA_Height (ULONG) -- Height of a frame in pixels.
  108.  
  109.             Applicability is (IG).
  110.  
  111.         ADTA_Depth (ULONG) -- Depth of the frame.
  112.  
  113.             Applicability is (IG).
  114.  
  115.         ADTA_Frames (ULONG) -- Number of frames in animation.
  116.  
  117.             Applicability is (ISG).
  118.  
  119.         ADTA_KeyFrame (struct BitMap *) -- Pointer to the key
  120.             frame.
  121.  
  122.             Applicability is (ISG).
  123.  
  124.         ADTA_FramesPerSecond (ULONG) -- Number of frames per
  125.             second to play.
  126.  
  127.         ADTA_NumColors (WORD) -- Number of colors used by the frame.
  128.  
  129.             Applicability is (ISG).
  130.  
  131.         ADTA_ColorRegisters (struct ColorRegister *) -- Color table; its
  132.             contents should match the colours in the ADTA_CRegs table.
  133.  
  134.             Applicability is (G).
  135.  
  136.         ADTA_CRegs (ULONG *) -- Color table to use with SetRGB32CM().
  137.  
  138.             Applicability is (G).
  139.  
  140.         ADTA_GRegs (ULONG *) -- Color table; this table is initialized
  141.             during the layout process and will contain the colours the
  142.             picture will use after remapping. If no remapping takes
  143.             place, these colours will match those in the ADTA_CRegs table.
  144.  
  145.         ADTA_ColorTable (UBYTE *) -- Shared pen table; this table is
  146.             initialized during the layout process while the frames
  147.             are being remapped.
  148.  
  149.             Applicability is (G).
  150.  
  151.         ADTA_ColorTable2 (UBYTE *) -- Shared pen table; in most places
  152.             this table will be identical to the ADTA_ColorTable table.
  153.             Some of the colours in this table might match the original
  154.             colour palette a little better than the colours picked for
  155.             the other table. The animation.datatype uses the two tables
  156.             during remapping, alternating for each pixel.
  157.  
  158.             Applicability is (G).
  159.  
  160.         ADTA_Allocated (ULONG) --  OBSOLETE; DO NOT USE.
  161.  
  162.             Applicability is (G).
  163.  
  164.         ADTA_NumAlloc (UWORD) -- Number of colors allocated by the frame.
  165.             In this context `allocated' refers to colours allocated via
  166.             graphics.library/ObtainBestPenA.
  167.  
  168.             Applicability is (G).
  169.  
  170.         ADTA_BitMapHeader (struct BitMapHeader *) -- Set and get the
  171.             base information for the animation.  BitMapHeader is defined in
  172.             <datatypes/pictureclass.h>
  173.  
  174.             Applicability is (G).
  175.  
  176.         ADTA_Sample (BYTE *) -- Pointer to sample data.
  177.  
  178.             NOTE: this tag was only (IS) in V40; this has been fixed
  179.                   in V44.
  180.  
  181.             Applicability is (ISG).
  182.  
  183.         ADTA_SampleLength (ULONG) -- Length of sample data.
  184.  
  185.             Applicability is (ISG).
  186.  
  187.         ADTA_Period (ULONG) -- Period to play back sample at.
  188.  
  189.             Applicability is (ISG).
  190.  
  191.         ADTA_Volume (ULONG) -- Volume to play back sample at (0..64).
  192.  
  193.             Applicability is (ISG).
  194.  
  195.         OBP_Precision (ULONG) -- Precision to use when obtaining colors.
  196.             See the PRECISION_[..] defines in <graphics/view.h>.
  197.  
  198.             Applicability is (I). Defaults to PRECISION_IMAGE. (V44)
  199.  
  200.         ADTA_LeftSample (BYTE *) -- Pointer to left channel sample
  201.             data. (V44)
  202.  
  203.             Applicability is (ISG).
  204.  
  205.         ADTA_RightSample (BYTE *) -- Pointer to right channel sample
  206.             data. (V44)
  207.  
  208.             Applicability is (ISG).
  209.  
  210.         ADTA_SamplesPerSec (ULONG) -- Number of samples per second to play;
  211.             if this is > 0, it takes precendence over ADTA_Period.
  212.  
  213.             Applicability is (ISG).
  214.  
  215.         ADTA_PreloadFrameCount (ULONG) -- Number of frames to preload. (V44)
  216.             Frames are preloaded when starting animation playback. The
  217.             loader will attempt to keep at least this number of frames
  218.             available for the display process. Note that when changing this
  219.             attribute the change does not take effect immediately.
  220.  
  221.             Default for this tag is 10. Applicability is (ISG).
  222.  
  223.     NOTES
  224.         The ADTM_LOADNEWFORMATFRAME and ADTM_UNLOADNEWFORMATFRAME methods
  225.         operate on struct adtNewFormatFrame format messages. The
  226.         adtNewFormatFrame message is an extension of the adtFrame message
  227.         with additional fields, such as required for stereo sound playback.
  228.         By default, animation.datatype will load and unload frames allocated
  229.         by its subclasses using the compatible ADTM_LOADFRAME and
  230.         ADTM_UNLOADFRAME methods. If your subclass needs to use the extended
  231.         adtNewFormatFrame format messages, it must say so by providing a
  232.         list of supported methods for animation.datatype to query through
  233.         the OM_GET/DTA_Methods tag. If both ADTM_LOADNEWFORMATFRAME and
  234.         ADTM_UNLOADNEWFORMATFRAME are among the methods supported by your
  235.         subclass, you will receive adtNewFormatFrame format messages instead
  236.         of the compatible adtFrame messages.
  237.  
  238.         Please note that applications such as MultiView will query the
  239.         methods supported by your class. Make sure that if you choose to
  240.         implement support for the OM_GET/DTA_Methods tag the methods you
  241.         return should also include the methods supported by your superclass.
  242.         Otherwise, the user will be unable to use functions such as "Copy"
  243.         or "Print".
  244.  
  245.         Since the adtNewFormatFrame message format may be enhanced in future
  246.         releases of animation.datatype, your subclass may access only
  247.         structure members that are known to exist in the message. To find
  248.         out which members are available, check the
  249.         adtNewFormatFrame->alf_Size member; it contains the total length of
  250.         the data structure (in bytes). Remember which message length you
  251.         require, then act accordingly. Please keep in mind that the
  252.         structure member adtNewFormatFrame->alf_Size does not exist in the
  253.         compatible adtFrame message data structure.
  254.  
  255.